package com.msstudio.i18n;


import com.msstudio.midlets.MSCMIDlet;

// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 


public class MultiLan
    implements Runnable
{//�����ֹ����ࣻ

    public static final int C_Lan_Chinese = 1;
    public static final int C_Lan_English = 0;
    public static final int C_Lan_Chinese_T = 2;
    public int language;
    private Thread thread;
    public String listArea[];
    public String sAddFall;
    public String sAddSucceed;
    public String sAddToFriendList;
    public String sAddUFriend;
    public String sAgree;
    public String sAllFriend;
    public String sAnswer;
    public String sAttachMessage;
    public String sBack;
    public String sBlackList;
    public String sCancel;
    public String sCanNotSendNull;
    public String sContinue;
    public String sDelete;
    public String sDeleteSucceed;
    public String sDetails;
    public String sExit;
    public String sFemale;
    public String sGetInfor;
    public String sHelp;
    public String sHistory;
    public String sHistoryIsNull;
    public String sInvalidUid;
    public String sLogin;
    public String sLoginFall;
    public String sLoginFallMsg;
    public String sLogining;
    public String sLoginMsgDeleted;
    public String sRegisterForm = null;
    public String sRegister = null;
    public String sLogouting;
    public String sMainMenu;
    public String sMale;
    public String sMenu;
    public String sMSC;
    public String sNetError;
    public String sNetErrorMsg;
    public String sNext;
    public String sNewMessage;
    public String sOnlineFriend;
    public String sPre;
    public String sHelpForm;
    public String sHelpMsg;
    public String sUserID;
    public String sPassword;
    public String sRefuse;
    public String sReLogin;
    public String sResearchResult;
    public String sSend;
    public String sSended;
    public String sSendFall;
    public String sSendMessage;
    public String sSelectAge;
    public String sSelectProvince;
    public String sSelectSex;
    public String sStart;
    public String sStranger;
    public String sSystemMessage;   
    public String sUHaveNoFriend;
    public String sUrBLFull;
    public String sUrBLNull;
    public String sWaitMsg;
    public String sYes;
    public String sYesToExit;
    public String sCurFriend;
    public String sFriendList;
    public String sFinger;
    public String sChangeStat;
    public String sReadMessage;
    public String sMenuSendMessage;
    public String sDeleteFriend;
    public String sAddToBlackList;
    public String sSysMessageMenu;
    public String sAddFriend;
    public String sFlowControlOn;
    public String sFlowControlOff;
    public String sCheckBlackList;
    public String sRemoveLoginInfor;
    public String sOnline;
    public String sLeave;
    public String sInvisible;
    public String sMenuAddToFriendList;
    public String sMenuGetInfor;
    public String sMenuHistory;
    public String sLoginForm = null;
    public String sNetConnectFallMsg;
    public String sInst;
    public String sTimeOut;
    public String sWrong;

    public MultiLan()
    {   
        thread = null;
        listArea = null;
        sAddFall = null;
        sAddSucceed = null;
        sAddToFriendList = null;
        sAddUFriend = null;
        sAgree = null;
        sAllFriend = null;
        sAnswer = null;
        sAttachMessage = null;
        sBack = null;
        sBlackList = null;
        sCancel = null;
        sCanNotSendNull = null;
        sContinue = null;
        sDelete = null;
        sDeleteSucceed = null;
        sDetails = null;
        sExit = null;
        sFemale = null;
        sGetInfor = null;
        sHelp = null;
        sHistory = null;
        sHistoryIsNull = null;
        sInvalidUid = null;
        sLogin = null;
        sLoginFall = null;
        sLoginFallMsg = null;
        sLogining = null;
        sLoginMsgDeleted = null;
        sMainMenu = null;
        sMale = null;
        sMenu = null;
        sMSC = null;
        sNetError = null;
        sNetErrorMsg = null;
        sNext = null;
        sNewMessage = null;
        sOnlineFriend = null;
        sPre = null;
        sHelpForm = null;
        sHelpMsg = null;
        sUserID = null;
        sPassword = null;
        sRefuse = null;
        sReLogin = null;
        sResearchResult = null;
        sSend = null;
        sSended = null;
        sSendFall = null;
        sSendMessage = null;
        sSelectAge = null;
        sSelectProvince = null;
        sSelectSex = null;
        sStart = null;
        sStranger = null;
        sSystemMessage = null;
        sUHaveNoFriend = null;
        sUrBLFull = null;
        sUrBLNull = null;
        sWaitMsg = null;
        sYes = null;
        sYesToExit = null;
        sCurFriend = null;
        sFriendList = null;
        sFinger = null;
        sChangeStat = null;
        sReadMessage = null;
        sMenuSendMessage = null;
        sDeleteFriend = null;
        sAddToBlackList = null;
        sSysMessageMenu = null;
        sAddFriend = null;
        sFlowControlOn = null;
        sFlowControlOff = null;
        sCheckBlackList = null;
        sRemoveLoginInfor = null;
        sOnline = null;
        sLeave = null;
        sInvisible = null;
        sMenuAddToFriendList = null;
        sMenuGetInfor = null;
        sMenuHistory = null;
        sLoginForm = null;
        sNetConnectFallMsg = null;
        sInst = null;
        sTimeOut = null;
        sWrong = null;
    }

    public String GetCombineMsg(int i, String s)
    {
        String as[] = {
            s
        };
        return Local.getText(i, as);
    }

    public String GetCombineMsg(int i, String s, String s1, String s2, String s3, String s4)
    {
        String as[] = {
            s, s1, s2, s3, s4
        };
        return Local.getText(i, as);
    }

    // 初始化国际化支持，根据locale设定显示内容：简体/繁体/英文
    public void init()
    {
        String s = System.getProperty("microedition.locale");
        if(s == null) {
            language = 0;
        } else if(s.equals("zh-CN")) {
            language = 1;
        }
        else if(s.startsWith("zh-")) {
            language = 2;
        }
        else {
            language = 0;
        }
        Local.loadI18nFromTxtFile("i18n");
        sLoginForm = Local.getText("LOGINFORM");//46
        sLogin = Local.getText("LOGIN"); // 43
        sBack = Local.getText("BACK");//17
        sExit = Local.getText("EXIT");//30);
        sReLogin = Local.getText("RELOGIN");//107);
        sStart = Local.getText("START");//118);
        sHelp = Local.getText("HELP");//36);
        sMSC = Local.getText("MSC");
                            
        sHelpMsg = Local.getText("HELPMSG");//4);
        sInvalidUid = Local.getText("INVALIDUID"); //40);
        sLoginFall = Local.getText("LOGINFAIL");//44);
        sLoginFallMsg = Local.getText("LOGINFAILMSG");//45);
        sLogining = Local.getText("LOGINING");//47);                
        sNetConnectFallMsg = Local.getText("NETCONNECTFAILMSG");//55);
        sNetError = Local.getText("NETERROR");//56);
        sNetErrorMsg = Local.getText("NETERRORMSG");//57);
        
        sHelpForm = Local.getText("HELPFORM");//100);
        sUserID = Local.getText("UID");//101);
        sPassword = Local.getText("PASSWORD");//102);
        
        sRegisterForm = Local.getText("REGISTERFORM");
        sRegister = Local.getText("REGISTER");
    }

    public void init2()
    {
        thread = new Thread(this);
        thread.setPriority(1);
        thread.start();
    }

    public void run()
    {
        setStrings();
        MSCMIDlet.instance.init();
        MSCMIDlet.instance.onLoadEnd();
    }

    public void setProvinces()
    {
        if(listArea == null)
            listArea = (new String[] {
                /*Local.getText(70), Local.getText(89), Local.getText(84), Local.getText(79), Local.getText(99), Local.getText(78), Local.getText(75), Local.getText(67), Local.getText(81), Local.getText(77), 
                Local.getText(66), Local.getText(90), Local.getText(69), Local.getText(68), Local.getText(91), Local.getText(83), Local.getText(93), Local.getText(94), Local.getText(72), Local.getText(86), 
                Local.getText(92), Local.getText(73), Local.getText(98), Local.getText(76), Local.getText(96), Local.getText(71), Local.getText(74), Local.getText(87), Local.getText(88), Local.getText(85), 
                Local.getText(95), Local.getText(97), Local.getText(82), Local.getText(80) */
                Local.getText("Alibaba")
                // Todo: 印度邦名
            });
    }

    public String MakeCombineMsg(String s, String s1)
    {
        int i = s.indexOf("%U");
        if(i >= 0)
            return s.substring(0, i) + s1 + s.substring(i + 2);
        else
            return s;
    }

    public void setStrings()
    {//���ø��ַ��ֵ��
        sYes = Local.getText("YES");//60);
        sLogouting = Local.getText("LOGOUT");//117);
        sAttachMessage = Local.getText("ATTACHMESSAGE");//16);
        sSended = Local.getText("SENT");//114);
        sGetInfor = Local.getText("GETINFOR");//35);
        sAddToFriendList = Local.getText("ADDTOFRIENDLIST");//9);
        sAgree = Local.getText("AGREE");//11);
        sRefuse = Local.getText("REFUSE");//104);
        sSystemMessage = Local.getText("SYSTEMMESSAGE");//121);
        sAddFall = Local.getText("ADDFAIL");//5);
        sAddSucceed = Local.getText("ADDSUCCEED");//7);
        sCancel = Local.getText("CANCEL");//19);
        sUrBLFull = Local.getText("URBLFULL");//124);
        sUrBLNull = Local.getText("URBLNULL");//125);
        sBlackList = Local.getText("BLACKLIST");//18);
        sPre = Local.getText("PRE");//65);
        sNext = Local.getText("NEXT");//59);
        sMale = Local.getText("MALE");//49);
        sFemale = Local.getText("FEMAIL");//31);
        sSelectProvince = Local.getText("SELECTPROVINCE");//111);
        sSelectAge = Local.getText("SELECTAGE");//110);
        sSelectSex = Local.getText("SELECTSEX");//112);
        sResearchResult = Local.getText("SEARCHRESULT");//109);
        sMenu = Local.getText("MENU");//63);
        sAllFriend = Local.getText("ALLFRIEND");//12);
        sOnlineFriend = Local.getText("ONLINEFRIEND");//62);
        sStranger = Local.getText("STANGER");//119);
        sUHaveNoFriend = Local.getText("UHAVENOFRIEND");//123);
        sYesToExit = Local.getText("YESTOEXIT");//128);
        sDetails = Local.getText("DETAILS");//29);
        sAnswer = Local.getText("ANSWER");//14);
        sNewMessage = Local.getText("NEWMESSAGE");//58);
        sDelete = Local.getText("DELETE");//25);
        sLoginMsgDeleted = Local.getText("");//48);
        sSend = Local.getText("");//113);
        sSendMessage = Local.getText("");//116);
        sSendFall = Local.getText("");//115);
        sCanNotSendNull = Local.getText("");//20);
        sDeleteSucceed = Local.getText("");//27);
        sWaitMsg = Local.getText("");//126);
        sHistory = Local.getText("");//37);
        sHistoryIsNull = Local.getText("");//38);
        sMainMenu = Local.getText("MAINMENU");//122);
        sContinue = Local.getText("");//23);
        sCurFriend = Local.getText("CURFRIEND");//24);
        sFriendList = Local.getText("FRIENDLIST");//39);
        sFinger = Local.getText("FINGER");//32);
        sChangeStat = Local.getText("CHANGESTAT");//21);
        sReadMessage = Local.getText("");//103);
        sMenuSendMessage = Local.getText("MENUSENDMESSAGE");//53);
        sDeleteFriend = Local.getText("DELETEFRIEND");//26);
        sAddToBlackList = Local.getText("ADDTOFRIENDLIST");//8);
        sSysMessageMenu = Local.getText("SYSTEMMESSAGE");//120);
        sAddFriend = Local.getText("ADDFRIEND");//6);
        sFlowControlOff = Local.getText("");//33);
        sFlowControlOn = Local.getText("");//34);
        sCheckBlackList = Local.getText("CHECKBLACKLIST");//22);
        sRemoveLoginInfor = Local.getText("REMOVELOGININFOR");//108);
        sOnline = Local.getText("ONLINE");//61);
        sLeave = Local.getText("LEAVE");//42);
        sInvisible = Local.getText("INVISIBLE");//41);
        sMenuAddToFriendList = Local.getText("");//50);
        sMenuGetInfor = Local.getText("MENUGETINFOR");//51);
        sMenuHistory = Local.getText("MENUHISTORY");//52);
        sInst = Local.getText("");//3);
        sTimeOut = Local.getText("");//1);
        sWrong = Local.getText("");//2);
        switch(language)
        {
        case 1: // 简体
            sAddUFriend = "%U 将你加为好友";
            break;
        case 2: // 繁体
            sAddUFriend = "%U 將你加為好友";
            break;
        default: // 英文
            sAddUFriend = "%U added you to his/her friend list.";
            break;
        }
    }
}
